package com.tjh.springbootapi.enums;


import com.koala.apiprototype.db.enums.IIntegerEnum;

/**
 * Create by koala on 2019-12-30
 */
public enum StateEnum implements IIntegerEnum {
    Active(0, "启用"),
    Inactive(1, "禁用");

    private Integer value;
    private String display;

    private StateEnum(Integer value, String display) {
        this.value = value;
        this.display = display;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDisplay() {
        return display;
    }

    public static StateEnum fromValue(Integer value) {
        return IIntegerEnum.fromValue(StateEnum.class, value);
    }
}
